Utopia refers to an imagined perfect society or community where everything is ideal, often characterized by harmony, equality, and happiness. Dystopia, on the other hand, describes a society that is undesirable or frightening, often marked by oppression, suffering, and a loss of freedom, serving as a cautionary tale about potential societal issues.